<script setup>
import { onBeforeMount, onMounted, onBeforeUnmount, onUnmounted } from "vue";
// import {
//   onBeforeMount,
//   onMounted,
//   onBeforeUnmount,
//   onUnmounted,
// } from "@dcloudio/uni-app"; // 注意：需要使用 @dcloudio/uni-app 导入生命周期钩子是不允许的❌

onBeforeMount(() => {
  console.log("组件挂载前");
});
onMounted(() => {
  console.log("组件挂载后");
});
onBeforeUnmount(() => {
  console.log("组件卸载前");
});
onUnmounted(() => {
  console.log("组件卸载后");
});
</script>

<template>
  <view class="">这是个人信息组件</view>
</template>

<style lang="scss" scoped></style>
